package com.ehome.poct.backend.fegin;

import com.ehome.core.page.PageInfo;
import com.ehome.poct.backend.api.qry.ReportPermissionPageQry;
import com.ehome.poct.backend.api.qry.ReportPermissionQry;
import com.ehome.poct.core.api.dto.report.ConfAnalysisPermissionDTO;
import com.ehome.poct.core.api.vo.report.ConfAnalysisPermissionVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;


/**
 * 血常规报告解读权限配置控制器
 *
 * @author wuyingchao
 * @Date 2022-09-06 09:57
 */
@FeignClient(value = "${service.poct-core:}${service.suffix.poct-core:}",path="/conf_analysis_permission",contextId = "AnalysisPermissionClient")
public interface AnalysisPermissionClient {

    @GetMapping({"/page"})
    PageInfo<ConfAnalysisPermissionVO> pageQuery(@SpringQueryMap ReportPermissionPageQry qry);

    @GetMapping("/one")
    ConfAnalysisPermissionVO queryOne(@SpringQueryMap ReportPermissionQry qry);

    @PostMapping
    void insert(@RequestBody ConfAnalysisPermissionDTO dto);

    @PutMapping({"/{id}"})
    void update(@PathVariable("id") Long id, @RequestBody ConfAnalysisPermissionDTO dto);

}
